// import './assets/main.css' 把自带的main.css 注释

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn' //中文国际化
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)




for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

const pinia = createPinia()//实例化pinia组件
pinia.use(piniaPluginPersistedstate)//在组件里放持久化插件
app.use(pinia)//app使用pinia组件


app.use(router)
app.use(ElementPlus, {//国际化配置
    locale: zhCn,
})

app.mount('#app')
